{{extend './_layouts/home.html'}} {{block 'content'}}
<!-- 用于获取学生信息 -->
<div class="container-fluid">
  <div class="row"></div>
  <div class="row">
    <div class="col-sm-6 col-sm-offset-3 col-md-8 col-md-offset-2 main">
      <div class="ta-header">
        <h2 class="sub-header">成绩信息</h2>
        <a href="/students/new" class="btn btn-info" style="margin-top: 5px">新增学生</a
        >
      </div>

      <div class="table-responsive">
        <table class="table table-striped">
          <thead>
            <tr>
              <th>学号</th>
              <th>姓名</th>
              <th>性别</th>
              <th>专业</th>
              <th>年级</th>
              <th>科目</th>
              <th>成绩</th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody>
            {{each students}}
            <tr>
              <td>{{$value.id}}</td>
              <td>{{$value.name}}</td>
              <td>{{$value.gender}}</td>
              <td>{{$value.major}}</td>
              <td>{{$value.grade}}</td>
              <td>{{$value.object}}</td>
              <td>{{$value.score}}</td>
              <td></td>
            </tr>
            {{/each}}
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>
{{/block}} {{block 'style'}}
<style>
  .jumbotron {
    background-color: #fff;
  }

  .ta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
</style>
{{/block}}